package com.xayy.health.mgt.model;

import cn.kawins.mybatis.base.BaseModel;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

/**
 * 质量分析
 * @author zhangxa
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "HEALTH.tb_data_quality")
public class DataQuality extends BaseModel<Long> {

    @Id
    @ExcelIgnore
    @Column(name = "id")
    private Long id;

    @ExcelIgnore
    @Column(name = "satellite_id")
    private Long satelliteId;

    @ExcelProperty("卫星代号")
    @Column(name = "satellite_code")
    private String satelliteCode;

    @ExcelIgnore
    @Column(name = "abnormal_type")
    @ApiModelProperty(value = "异常类型")
    private Integer abnormalType;

    @ExcelProperty("异常类型")
    @Transient
    private String abnormalTypeName;

    @ExcelProperty("说明")
    @Column(name = "explain")
    @ApiModelProperty(value = "说明")
    private String explain;

    @ExcelProperty("异常时间")
    @Column(name = "create_time")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ExcelIgnore
    @Column(name = "update_time")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @Override
    public Long idValue() {
        return id;
    }
}
